﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BPM.Common
{
	public class TypeComparer : IComparer<Type>
	{
		public static readonly TypeComparer Instance = new TypeComparer();

		private TypeComparer() { }

		public int Compare(Type x, Type y)
		{
			var result = x.Name.CompareTo(y.Name);

			if (result == 0)
			{
				result = x.FullName.CompareTo(y.FullName);
			}

			return result;
		}
	}
}
